import java.util.Calendar;
import java.util.GregorianCalendar;

public class CalendarUtil {

    public static void main(String[] args) {
    
        Calendar calendar1 = new GregorianCalendar(2012,11,30);
        Calendar calendar2 = new GregorianCalendar(2013,0,5);
    
        long millis1 = calendar1.getTimeInMillis();
        long millis2 = calendar2.getTimeInMillis();
        //System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+millis1);
        int year1 = calendar1.get(Calendar.YEAR);
        int year2 = calendar2.get(Calendar.YEAR);
        int month1 = calendar1.get(Calendar.MONTH);
        int month2 = calendar2.get(Calendar.MONTH);
        
        int dayOfMonth1 = calendar1.get(Calendar.DAY_OF_MONTH);
        int dayOfMonth2 = calendar2.get(Calendar.DAY_OF_MONTH);
      
        Calendar c1 = Calendar.getInstance();
        while (year1 < 2015) {
            millis1 = calendar1.getTimeInMillis();
            millis2 = calendar2.getTimeInMillis();
       
            year1 = calendar1.get(Calendar.YEAR);
            month1 = calendar1.get(Calendar.MONTH); 
            dayOfMonth1 = calendar1.get(Calendar.DAY_OF_MONTH);
            year2 = calendar2.get(Calendar.YEAR);
            month2 = calendar2.get(Calendar.MONTH); 
            dayOfMonth2 = calendar2.get(Calendar.DAY_OF_MONTH);
            
            System.out.print(year1);
            System.out.print("-" + (1+month1));
            System.out.print("-" + dayOfMonth1+"\t\t\t"+year2+"-"+(1+month2)+"-"+dayOfMonth2+"\n");
          
            calendar1.setTimeInMillis(millis1 + 3600 * 1000 * 24 * 7);
            calendar2.setTimeInMillis(millis2 + 3600 * 1000 * 24 * 7);
        }
    }

}
